@model IEnumerable<ExpertSMS.Models.Kitchen>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Name
        </th>
        <th>
            KitchenFoodStocks
        </th>
        <th>
            KitchenProductStocks
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.KitchenID }) |
            @Html.ActionLink("Details", "Details", new { id=item.KitchenID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.KitchenID })
        </td>
        <td>
			@item.Name
        </td>
        <td>
			@(item.KitchenFoodStocks == null ? "None" : item.KitchenFoodStocks.Count.ToString())
        </td>
        <td>
			@(item.KitchenProductStocks == null ? "None" : item.KitchenProductStocks.Count.ToString())
        </td>
    </tr>
}

</table>


